package com.imu.purse.modules.app.dao;

import org.apache.ibatis.annotations.Update;

import com.imu.core.base.BaseMapper;
import com.imu.purse.modules.app.entity.ImuUserIdentityEntity;

public interface ImuUserIdentiryMapper extends BaseMapper<ImuUserIdentityEntity> {

	/****
	 * 根据用户ID删除用户的密钥
	 * @param entity
	 */
	@Update({"delete from imu_identity "
	 		+ "where user_id = #{userId}"
	 })
	public int delByUserId(Long userId);
	
	/****
	 * 根据用户ID修改用户密钥为空
	 * @param entity
	 */
	@Update({"UPDATE imu_identity "
	 		+ "SET SECRET_KEY = '' "
	 		+ "where user_id = #{userId}"
	 })
	public int updByUserId(Long userId);
}
